{extend name="mainadmin@layouts/base" /}
{block name="main" }
<header class="header  b-b clearfix">
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="fa fa-ellipsis-v"></i>
                <strong>审核店铺</strong>
            </li>
        </ul>
        <a class="text-muted pull-right pointer p-r m-t-md" data-toggle="back" title="返回"><i class="fa fa-reply"></i></a>
    </div>
</header>
<body style="overflow-y:scroll;">


<form class="form-horizontal form-validate " method="post" action="{:url('info')}">
    <!--    <div class="modal-dialog">-->
        <div class="tab-content">
<!--            <div class="modal-header">-->
<!--                <button type="button" class="close" data-dismiss="modal">&times;</button>-->
<!--                <h4 class="modal-title">审核管理</h4>-->
<!--            </div>-->
            <div class="modal-body">

            		<div class="form-group">
                        <label class="col-sm-2 control-label">用户ID：</label>
                        <div class="col-sm-6 m-t-mc">
                            <input type="text" name="user_id" disabled="disabled" value="{$row.user_id}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">门店名称：</label>
                        <div class="col-sm-6 m-t-mc">
                            <input type="text" name="store_name" value="{$row.store_name}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">联系人：</label>
                        <div class="col-sm-6 m-t-mc">
                            <input type="text" name="username" value="{$row.username}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">联系电话：</label>
                        <div class="col-sm-6 m-t-mc">
                            <input type="text" name="store_phone" value="{$row.store_phone}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">身份证号：</label>
                        <div class="col-sm-6 m-t-mc">
                            <input type="text" name="identity_card" value="{$row.identity_card}">
                        </div>
                    </div>
<!--                    <div class="form-group">-->
<!--                        <label class="col-sm-2 control-label">申请区域：</label>-->
<!--                        <div class="col-sm-6 m-t-mc">-->
<!--                            <input type="text" name="merger_name" value="{$row.merger_name}">-->
<!--                        </div>-->
<!--                    </div>-->

                    <div class="form-group">
                        <label class="col-sm-2 control-label">申请区域：</label>
                        <div class="form-group m-t-md">

                            <div class="col-sm-3">
                                <div class="cell">
                                    <div class="cell_bd">
                                        <tr>
                                            <td>
                                                <select class="seauii" style="width: 87px;" name="province_id" id="province" onChange="get_city(this)">
                                                    <option value="0">请选择</option>
                                                    {volist name="province" id="p"}
                                                    <option  {if condition="isset($row['province_id']) &&$row['province_id'] eq $p['id']"}selected{/if}  value="{$p.id}">{$p.name}</option>
                                                    {/volist}
                                                </select>

                                                <select class="seauii" name="city_id" id="city" onChange="get_area(this)">
                                                    <option  value="">请选择</option>
                                                    {if isset($city)}
                                                    {volist name="city" id="p"}
                                                    <option {if condition="isset($row['city_id']) &&$row['city_id'] eq $p['id']"}selected{/if}  value="{$p.id}">{$p.name}</option>
                                                    {/volist}
                                                    {/if}
                                                </select>

                                                <select class="seauii" name="district_id" id="district">
                                                    <option  value="0">请选择</option>
                                                    {if isset($city)}
                                                    {volist name="district" id="p"}
                                                    <option {if condition="isset($row['district_id']) &&$row['district_id'] eq $p['id']"}selected{/if}  value="{$p.id}">{$p.name}</option>
                                                    {/volist}
                                                    {/if}
                                                </select>
                                                <br>
                                            </td>
                                        </tr>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">经度：</label>
                    <div class="col-sm-6 m-t-mc">
                        <input type="text" name="lng" value="{$row.lng}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">纬度：</label>
                    <div class="col-sm-6 m-t-mc">
                        <input type="text" name="lat" value="{$row.lat}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">详细地址：</label>
                    <div class="col-sm-6 m-t-mc">
                        <input type="text" style="width: 500px;" name="store_address" value="{$row.store_address}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">门店介绍：</label>
                    <div class="col-sm-6 m-t-mc">
                        <input type="text" style="width: 500px;" name="introduction" value="{$row.introduction}">
                    </div>
                </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">门店照片：</label>
                        <div class="col-sm-8 must" >
                            <div id="image_upload1" class="">
                                <img class="thumb_img" name="store_img" src="{$row.store_img}" style="max-height: 100px;">
                                <input class="hide" name="store_img" value="{$row.store_img}" type="text">
                                <button class="btn btn-default" type="button" data-toggle="selectimg">选择图片</button>
<!--                                <span>选择上传幻灯片图片（建议尺寸：750 * 500）</span>-->
                            </div>
                        </div>
                    </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">身份证正面：</label>
                    <div class="col-sm-8 must" >
                        <div id="image_upload2" class="">
                            <img class="thumb_img" name="identity_img_one" src="{$row.identity_img_one}" style="max-height: 100px;">
                            <input class="hide" name="identity_img_one" value="{$row.identity_img_one}" type="text">
                            <button class="btn btn-default" type="button" data-toggle="selectimg">选择图片</button>
                            <!--                                <span>选择上传幻灯片图片（建议尺寸：750 * 500）</span>-->
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">身份证反面：</label>
                    <div class="col-sm-8 must" >
                        <div id="image_upload3" class="">
                            <img class="thumb_img" name="identity_img_tow" src="{$row.identity_img_tow}" style="max-height: 100px;">
                            <input class="hide" name="identity_img_tow" value="{$row.identity_img_tow}" type="text">
                            <button class="btn btn-default" type="button" data-toggle="selectimg">选择图片</button>
                            <!--                                <span>选择上传幻灯片图片（建议尺寸：750 * 500）</span>-->
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">营业执照：</label>
                    <div class="col-sm-8 must" >
                        <div id="image_upload4" class="">
                            <img class="thumb_img" name="business_license" src="{$row.business_license}" style="max-height: 100px;">
                            <input class="hide" name="business_license" value="{$row.business_license}" type="text">
                            <button class="btn btn-default" type="button" data-toggle="selectimg">选择图片</button>
                            <!--                                <span>选择上传幻灯片图片（建议尺寸：750 * 500）</span>-->
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">门店logo：</label>
                    <div class="col-sm-8 must" >
                        <div id="image_upload5" class="">
                            <img class="thumb_img" name="store_logo_img" src="{$row.store_logo_img}" style="max-height: 100px;">
                            <input class="hide" name="store_logo_img" value="{$row.store_logo_img}" type="text">
                            <button class="btn btn-default" type="button" data-toggle="selectimg">选择图片</button>
                            <!--                                <span>选择上传幻灯片图片（建议尺寸：750 * 500）</span>-->
                        </div>
                    </div>
                </div>

<!--                <div class="form-group">-->
<!--                    <label class="col-sm-2 control-label">门店照片：</label>-->
<!--                    <div class="col-sm-6 m-t-mc">-->
<!--                        <img src="{$row.store_img}" style="height: 200px" alt="">-->
<!--                        <input type="hidden" name="store_img" value="{$row.store_img}">-->
<!--                    </div>-->
<!--                </div>-->

<!--                <div class="form-group">-->
<!--                    <label class="col-sm-2 control-label">身份证正面：</label>-->
<!--                    <div class="col-sm-6 m-t-mc">-->
<!--                        <img src="{$row.identity_img_one}" style="height: 200px" alt="">-->
<!--                        <input type="hidden" name="identity_img_one" value="{$row.identity_img_one}">-->
<!--                    </div>-->
<!--                </div>-->

<!--                <div class="form-group">-->
<!--                    <label class="col-sm-2 control-label">身份证反面：</label>-->
<!--                    <div class="col-sm-6 m-t-mc">-->
<!--                        <img src="{$row.identity_img_tow}" style="height: 200px" alt="">-->
<!--                        <input type="hidden" name="identity_img_tow" value="{$row.identity_img_tow}">-->
<!--                    </div>-->
<!--                </div>-->

<!--                <div class="form-group">-->
<!--                    <label class="col-sm-2 control-label">营业执照：</label>-->
<!--                    <div class="col-sm-6 m-t-mc">-->
<!--                        <img src="{$row.business_license}" style="height: 200px" alt="">-->
<!--                        <input type="hidden" name="business_license" value="{$row.business_license}">-->
<!--                    </div>-->
<!--                </div>-->
                <div class="form-group">
                    <label class="col-sm-2 control-label">申请时间：</label>
                    <div class="col-sm-6 m-t-mc">
                        {$row.create_time|dateTpl}
                    </div>
                </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">请审核：</label>
                        <div class="col-sm-6 m-t-mc">
                            <select name="status" id="">
                                <option value="">请选择</option>
                                <option value="0" {if condition="$row.status == 0"} selected {/if}>未审核</option>
                                <option value="1" {if condition="$row.status == 1"} selected {/if}>通过</option>
                                <option value="2" {if condition="$row.status == 2"} selected {/if}>拒绝</option>
                            </select>
                        </div>
                    </div>

            </div>
            <div class="modal-footer">
                <input type="hidden" name="store_id" id="operating" value="{$row.store_id}"/>
                <input type="hidden" name="user_id" id="user_id" value="{$row.user_id}"/>
                <button type="submit" class="btn btn-primary operatbtn">保存</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
</form>
</body>
<script type="text/javascript">
    /**
     * 获取城市
     * @param t  省份select对象
     */
    function get_city(t){
        // $('#city').css('display','block');
        var arr = new Object();
        arr.parent_id = $(t).val();
        if(!arr.parent_id > 0){
            return;
        }
        $('#district').empty().css('display','none');
        $('#twon').empty().css('display','none');
        $("#city").find("option").remove();
        jq_ajax('{:url("sys_admin.users/getRegion")}',arr,function(v){
            v = '<option value="0">选择城市</option>'+ v;
            // $('#city').empty().html(v);
            $("#city").append(v);
        });
    }

    /**
     * 获取地区
     * @param t  城市select对象
     */
    function get_area(t){
        var arr = new Object();
        arr.parent_id = $(t).val();
        if(!arr.parent_id > 0){
            return;
        }
        $('#district').empty().css('display','inline');
        $('#twon').empty().css('display','none');
        $("#district").find("option").remove();
        jq_ajax('{:url("sys_admin.users/getRegion")}',arr,function(v){
            v = '<option value="0">选择城市</option>'+ v;
            $('#district').empty().html(v);
            // $("#district").append(v);
        });
    }
$(document).on('click','.operatbtn',function(){
    $('select option:selected').val();
	$('#operating').val();
	$('.postBtn').click();
})
</script>
{/block}
